﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using ProjectFootball.Foundation.Entities;
using ProjectFootball.Foundation.Interfaces;

namespace ProjectFootball.Foundation.ViewModels
{
    public abstract class BaseApprovableViewModel<TEntityV> : BaseViewModel, IApprovableViewModel<TEntityV>
        where TEntityV : BaseApprovableEntity
    {
        public Guid PrimaryKey { get; set; }

        public string ShortPrimaryKey
        {
            get { return PrimaryKey.ToShortGuid(); }
        }

        public Guid HeaderKey { get; set; }
        public Byte[] RowVersion { get; set; }
        public TEntityV VersionEntity { get; set; }

        [DataType(DataType.Date)]
        [Display(Name = "Effective from")]
        public DateTime EffectiveFrom { get; set; }

        [DataType(DataType.Date)]
        [Display(Name = "Effective to")]
        public DateTime EffectiveTo { get; set; }

        public IList<BreadcrumbViewModel> Breadcrumbs { get; set; }


        
    }
}
